package com.cn.service.server.bc.Impl;


import com.cn.bean.pojo.bc.Kh;
import com.cn.mapper.dao.db1.bc.GetKhDao;
import com.cn.service.server.bc.GetKhServer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class GetKhServerImpl implements GetKhServer {
    private final GetKhDao getKhDao;

    @Autowired(required=false)
    public GetKhServerImpl(GetKhDao getKhDao) {
        this.getKhDao = getKhDao;
    }


    @Override
    public List<Kh> getKh(String khbm, String khmc, int limit, int page) {
        List<Kh> kh = getKhDao.getKh(khbm, khmc, limit, page);
        return kh;
    }

    @Override
    public List<Kh> selectIsContainKh(int id, int khbm) {

        return getKhDao.selectIsContainKh(id,khbm);
    }

    @Override
    public int addKh(int id, String khbm, String khmc) {
        return getKhDao.addKh(id,khbm,khmc);
    }

    @Override
    public List<Kh> selectKh() {
        return getKhDao.selectKh();
    }
}
